package cn.edu.zut.service.Impl;

import cn.edu.zut.dao.NewsDao;
import cn.edu.zut.domain.News;
import cn.edu.zut.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewsServiceImpl implements NewsService {
    @Autowired
    private NewsDao dao;
    @Override
    public List<News> findAll() {
        return dao.findAll();
    }
    @Override
    public  void insertOne(News news) throws Exception {dao.insertOne(news);}
    @Override
    public void deleteById(int _id) {
        dao.deleteById(_id);
    }
}
